﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterALSafa.Master" AutoEventWireup="true" CodeBehind="DeleteStudent.aspx.cs" Inherits="School.Pages.Admission.DeleteStudent" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
        <ProgressTemplate>
            <div id="displaybox">
                <div>
                    جارى تنفيذ الأمر</div>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <h2>
        كشف حساب الطالب</h2>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table>
                <tr>
                    <td style="width:20%">
                        <table>
                            <tr>
                                <td>
                                    المجمع
                                </td>
                                <td>
                                    <asp:DropDownList ID="LstCampuses" runat="server" OnSelectedIndexChanged="LstCampuses_SelectedIndexChanged"
                                        AutoPostBack="True">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    الشهادة
                                </td>
                                <td>
                                    <asp:DropDownList ID="LstCertificates" runat="server" AutoPostBack="True" OnSelectedIndexChanged="LstCertificates_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    المرحلة
                                </td>
                                <td>
                                    <asp:DropDownList ID="LstStages" runat="server" AutoPostBack="True" OnSelectedIndexChanged="LstStages_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    الصف
                                </td>
                                <td>
                                    <asp:DropDownList ID="LstGrades" runat="server" AutoPostBack="True" OnSelectedIndexChanged="LstGrades_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr style="display:none">
                                <td>
                                    الفصل
                                </td>
                                <td>
                                    <asp:DropDownList ID="lstClasses" runat="server" AutoPostBack="True" OnSelectedIndexChanged="lstClasses_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    الطالب
                                </td>
                                <td>
                                    <asp:DropDownList ID="lstStudents" runat="server" 
                                        onselectedindexchanged="lstStudents_SelectedIndexChanged" 
                                        AutoPostBack="True">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td>      
                    <h2>البحث</h2>                  
                        <table>
                            <tr>
                                <td>
                                    اسم الطالب
                                </td>
                                <td>
                                    <asp:TextBox ID="TxtStudentName" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    أو رقم الطالب
                                </td>
                                <td>
                                    <asp:TextBox ID="TxtStudentNumber" runat="server"></asp:TextBox>
                                </td>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Button ID="BtnSearch" runat="server" Text="بحث" OnClick="BtnSearch_Click" />
                    </td>
                </tr>
            </table>
                    </td>
                </tr>
                <tr>
                <td colspan="2">
                    <asp:Panel CssClass="students_search_grid" ID="StudentsPanel" runat="server" Visible="false">
                        <h2>
                            الطلاب</h2>
                        <asp:GridView ID="StudentsGrid" runat="server" Width="100%" CssClass="Grid" HeaderStyle-CssClass="GridHeaderFooter"
                            FooterStyle-CssClass="GridHeaderFooter" PagerStyle-CssClass="GridPager" AlternatingRowStyle-CssClass="GridItemAltername"
                            AutoGenerateColumns="False" Visible="False" 
                            onrowcommand="StudentsGrid_RowCommand">
                            <AlternatingRowStyle CssClass="GridItemAltername" />
                            <Columns>
                                <asp:BoundField DataField="StudentNumber" HeaderText="رقم الطالب" />
                                <asp:BoundField DataField="StudentName" HeaderText="اسم الطالب" />
                                <asp:BoundField DataField="Certificate" HeaderText="القسم" />
                                <asp:BoundField DataField="Grade" HeaderText="الصف" />
                                <asp:TemplateField Visible="False">
                                    <ItemTemplate>
                                        <asp:Label ID="LblStudentId" runat="server" Text='<%# Eval("Id") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:ButtonField ButtonType="Button" Text="اختيار" CommandName="Select" />
                            </Columns>
                            <FooterStyle CssClass="GridHeaderFooter" />
                            <HeaderStyle CssClass="GridHeaderFooter" />
                            <PagerStyle CssClass="GridPager" />
                        </asp:GridView>
                        <asp:Label Font-Size="Larger" ID="LblSearchNotFound" runat="server" Text="لم يتم العثور على الطالب"
                            ForeColor="Red" Visible="false"></asp:Label>
                    </asp:Panel>                    
                </td>
            </tr>
                <tr>
                    <td colspan="2">
                        <asp:HiddenField ID="HFStudentId" runat="server" 
                            onvaluechanged="HFStudentId_ValueChanged" Value="0" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Button ID="Button1" runat="server" Text="حذف" onclick="Button1_Click" />
                        <asp:Label ID="lblResult" runat="server" Text="" Font-Size="Large" Font-Bold="true"></asp:Label>
                    </td>
                </tr>
                
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>